import React, { useState } from 'react';
import './App.scss';
import { useTitle,useProList  } from './hooks';
function App() { 
  // useTitle('这是标题')
  const [title,setTitle] = useState('我的标题')
  const proList = useProList(5)
  useTitle(title)
  return (
    <div>
      <h1 className="rotate">APP</h1>
      <button onClick={()=>{
        setTitle('楚河')
      }}>修改标题</button>
      <ul>
        {
          proList.map(item=>(
            <li key={item.proid}>{item.proname}</li>
          ))
        }
      </ul>
    </div>
  );
}

export default App;